import { FC, useReducer } from 'react'
import reducer from './reducer'

const Foo: FC = () => {
	const [state, dispatch] = useReducer(reducer, { count: 0 })

	const addcount = () => dispatch({ type: 'add' })

	return (
		<>
			<button onClick={addcount}>countB++ =&gt; {state.count}</button>
		</>
	)
}
export default Foo
